A storage system comprises a persistent storage medium and a storage processor running storage software applications. The storage medium may be hard disk drives (HDDs), solid-state devices (SSDs), a combination of HDDs and SSDs (Hybrid), or storage devices using another storage technology. The storage medium may include a RAID (Redundant Array of Inexpensive Disks) hardware or software for data redundancy and load balancing. The storage medium may also include a NVRAM device for deferred writes. The storage processor may be dedicated to running storage software applications or shared between storage software applications and user applications. Storage software applications, such as a logical volume manager or a filesystem, provide storage virtualization, data services, and data mobility.
Storage virtualization decouples the logical storage space addressed by user applications from the physical data placement on the persistent storage medium. Storage virtualization allows the storage processor to optimize physical data placement based on the characteristics of the storage medium and provide value added data services such as deduplication and snapshot. To support storage virtualization, the storage processor translates user Input/Output (I/O) requests addressed in logical block numbers (LBNs) to another set of I/O requests addressed in physical block numbers (PBNs) to the storage medium. In order to perform this translation the storage processor maintains a forward map table of metadata entries, each of which maps a data block's LBN to its PBN on the storage medium. To support data deduplication the storage processor maintains a deduplication table of metadata entries, each of which maps a data block's fingerprint (a hash of the block's contents) to its PBN on the storage medium. Additional metadata may be maintained in support of other data services such as compression and snapshot.
A data block is the smallest storage unit that the storage processor manages via the metadata tables. The size of the data block can be as small as 4 KB or as large as an entire volume. There are advantages in employing small data block sizes in order to optimize data placement and increase deduplication ratio. The size of the forward map table is determined by the data block size and the usable capacity of the storage system. On a small capacity storage system with a large data block size, the entire metadata tables may be small enough to be stored in DRAM for fast access. However metadata tables are becoming increasingly bigger driven by larger physical capacity and smaller data block sizes. Data services such as deduplication, compression, and snapshot also increase the metadata table size by many folds by increasing the usable capacity of the system. In the case where the DRAM is not large enough to store the entire metadata table, the metadata table is stored on the storage medium, with a portion of it cached in the DRAM. Caching is only effective when metadata access has locality of reference—real world user applications tend to access related logical storage addresses frequently. User application locality of reference allows the storage processor to cache frequently accessed metadata entries in the DRAM without significant loss of performance. Without user application locality of reference, caching simply devolves into thrashing, which exhausts system resources and slows down performance.
Data mobility is becoming increasingly important in modern storage systems. One example of data mobility is garbage collection, which moves user data from a first partially filled segment to another on a solid state storage medium until the entire first segment contains no more user data and can be reused for new sequential writes. Another example is load balancing after capacity expansion or component failures. Load balancing moves user data from their current physical locations to new locations in order to redistribute user data and their access across all available capacity and bandwidth. Data mobility is expected to be transparent to user applications—change in a data block's physical location should not affect its LBN addressed by user applications. To support transparent data mobility, the storage processor maintains a reverse map metadata table that maps every physical data block's PBN to one or more LBNs. As part of moving a data block from PBN1 to PBN2, the storage processor first uses PBN1 to identify the physical block's entry in the reverse map table and the block's one or more LBNs. It then uses these LBNs to identify the block's entries in the forward map table and update these entries to map to PBN2. The storage processor then updates the reverse map table to delete the entry for PBN1 and add an entry for PBN2. It then needs to calculate the data block's fingerprint and update the fingerprint's entry in the deduplication table so it maps to PBN2. Given that data mobility does not benefit from user application locality of reference, these numerous accesses to multiple metadata tables cannot be effectively cached in the DRAM, causing the system to thrash.
In view of the above, there is a need for more efficient metadata management in support of storage virtualization, data services, and data mobility.